public class Test {

    public static void main(String[] args) {
        String s1 = "abcabc";
        String s2 = "DFf";
        String s3 = "ABC";
        String s4 = "abcdEFG";
        String s5 = "ABCdefg";

        System.out.println(s1.compareToIgnoreCase(s2));//结果为-1
        /*System.out.println(s1.compareToIgnoreCase(s3));//结果为0
        System.out.println(s1.compareToIgnoreCase(s4));//结果为-4
        System.out.println(s4.compareToIgnoreCase(s5));//结果为0*/
    }
    public static void main2(String[] args) {
        //s1和s2引用的是不同的对象，s1和s3引用的是相同的对象
        String s1 = "hello";
        String s2 = "world";
        String s3 = s1;
        //这是一个字符判空函数，如果s1里面存放值为false
        //没有存放值为true
        System.out.println(s1.isEmpty());
    }
    public static void main1(String[] args) {
        String s1 = "hello";
        System.out.println(s1);
        String s2 = new String("hahahhaha");
        System.out.println(s2);
        char[] array = {'a','b','c'};
        String s3 = new String(array);
        System.out.println(s3);

    }
}
